package com.EthanYankang;

import java.net.Socket;

/**
 * @Author: Ethan Yankang
 * @Program: my-tomcat2
 * @Date: 2024-09-09 14:16
 **/
public class Request extends AbstractHttpRequest {

    private  Socket socket;
    private  String requestMethod;
    private  String requestURL;
    private  String requestProtocol;


    public Socket getSocket() {
        return socket;
    }

    public Request(Socket socket, String requestMethod, String requestURL, String requestProtocol) {
        this.socket = socket;
        this.requestMethod = requestMethod;
        this.requestURL = requestURL;
        this.requestProtocol = requestProtocol;
    }

    public String getProtocol() {
        return requestProtocol;
    }

    @Override
    public StringBuffer getRequestURL() {
        return new StringBuffer(requestURL);
    }

    public String getMethod() {
        return requestMethod;
    }
}
